<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>

<head>
	<meta charset="UTF-8">
	<title>注册</title>

	<!--引入jquery-->
	<script src="${pageContext.request.contextPath }/js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
	<!--引入bootsrap-->
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.css"/>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap-theme.css"/>
	<script src="${pageContext.request.contextPath }/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
	<script src="${pageContext.request.contextPath }/js/npm.js" type="text/javascript" charset="utf-8"></script>
	
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/user/regist.css"/>
		
		
	<script type="text/javascript">
		
		$(function(){
			
			$('#usname').on('change', function(){
				//获得输入内容
				var usname = $(this).val();
				//通过ajax后台发送异步请求
				$('#usnameExit').load(
						"${pageContext.request.contextPath }/UserServlet?action=usnameExit",  //url		
						{
							"usname":usname
						} //data, 数据格式json格式
				);
			});
			
			
		});
		
	</script>
		
</head>

<body>
	
		
	
	
	<div class="container-fluid regist">				
		<div class="container main">				
			<h3>用户注册</h3>	
			<br /><br />
			
			<form class="form-horizontal" action="${pageContext.request.contextPath }/UserServlet?action=regist" 
						method="post">
			 	<div class="form-group">
			    	<label for="username" class="col-sm-2 control-label">用户名</label>
				    <div class="col-sm-6">
				      <input id="usname" name="cName" type="text" class="form-control" placeholder="请输入用户名" autofocus="autofocus">
				    </div>
				    <label id="usnameExit" for="username" class="control-label nameresult"></label>
				  </div>
			   	<div class="form-group">
				    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
				    <div class="col-sm-6">
				      <input name="cPassword" type="password" class="form-control" placeholder="请输入密码">
				    </div>
				  </div>
			   	<div class="form-group">
				    <label for="confirmpwd" class="col-sm-2 control-label">确认密码</label>
				    <div class="col-sm-6">
				      <input type="password" class="form-control" placeholder="请输入确认密码">
				    </div>
				</div>
				<div class="form-group">
				    <label for="date" class="col-sm-2 control-label">出生日期</label>
				    <div class="col-sm-6">
				      <input name="cBirthDate" type="date" name="birthday" class="form-control"  >		      
				    </div>
				</div>
				<div class="form-group opt">  
				  	<label for="inlineRadio1" class="col-sm-2 control-label">性别</label>  
				 	<div class="col-sm-6">
					    <label class="radio-inline">
					  		<input name="cGender" value="0" type="radio" name="sex" checked="checked"> 男
						</label>
						<label class="radio-inline">
					 	 <input  name="cGender" value="1" type="radio" name="sex" > 女
						</label>
					</div>
			 	</div>
			  	<!-- <div class="form-group">
				    <label for="date" class="col-sm-2 control-label">头像</label>
				    <div class="col-sm-6">
				      <input name="usheader" type="file" class="form-control"  >		      
				    </div>
				</div> -->
				<div class="form-group">
				    <label for="inputCardID1" class="col-sm-2 control-label">身份证</label>
				    <div class="col-sm-6">
				      <input name="cCardID" type="text" class="form-control" placeholder="请输入身份证号码">
				 	</div>
				 </div>
				<div class="form-group">
				    <label for="inputCPhone1" class="col-sm-2 control-label">电话</label>
				    <div class="col-sm-6">
				      <input name="cPhone" type="cell" class="form-control" placeholder="请输入电话号码">
				 	</div></div>
				 
				 <div class="form-group"> 
				    <label for="inputcRemark1" class="col-sm-2 control-label">备注</label>
				    <div class="col-sm-6">
				      <input name="cRemark" type="text" class="form-control" placeholder="备注">
				 	</div>
				 </div>
				 
				<br /><br />
			 		
			  	<div class="form-group">
				    <div class="col-sm-offset-2 col-sm-6">
				      <button type="submit" class="btn btn-primary btn-lg btn-block btn-danger">马上注册</button>
				    </div>
				</div>
			 
			 	<br />
			 	<br />
			 	
			</form>
			
			
		</div>			
	</div>
		
	
	
	<!--foot-->				
	<jsp:include page="/user/footer.jsp"></jsp:include>
		
</body>

</html>